<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>z轴平移</title>
    <style>
        html{
            /* 设置网页视距 */
            perspective: 800px;
        }
        body {
            border: 1px solid black;
            /* background-color: #aaa; */
        }
        .box1 {
            width: 200px;
            height: 200px;
            /* border-radius: 50%; */
            background-color: skyblue;
            margin: 300px auto;
            transition: 1.5s;
        }
        body:hover .box1 {
            /* z轴平移 */
            /* transform: translateZ(600px); */
            /* 旋转 */
            /* transform: rotateX(90deg); */
            transform: rotateY(90deg);
        }
    </style>
</head>
<body>
    <div class="box1"></div>
</body>
</html>